{extend name="public:base" /}
{block name="theme"}业务管理{/block}
{block name="small_theme"}业务列表{/block}
{block name="breadcrumb"}
<li><a href="{:url('olist')}">业务列表</a></li>
<li class="active">业务首页</li>
{/block}
{block name="content"}
<!--<link rel="stylesheet" href="__CSS__/style.css">-->
<link rel="stylesheet" href="__CSS__/indexcommon.css">
<section class="content" style="min-height: 200px;font-size: 12px;">
    <form method="get" action="{:url('olist')}" >
        <div class="box_">
            <div class="box_left">
                <div class="form-group">
                    <label>ID</label>
                    <input type="text" class="form-control" name="id" placeholder="ID" value="{$form.id}" >
                </div>
                <div class="form-group">
                    <label>姓名</label>
                    <input type="" class="form-control" name="name" placeholder="顾客姓名" value="{$form.name}" >
                </div>
                <div class="form-group">
                    <label>妈妈电话</label>
                    <input type="" class="form-control" name="maphone" placeholder="电话"  value="{$form.maphone}">
                </div>
                <div class="form-group">
                    <label>家人电话</label>
                    <input type="" class="form-control" name="otherphone" placeholder="电话"  value="{$form.otherphone}">
                </div>
                <div class="form-group">
                    <label>微信</label>
                    <input type="" class="form-control" name="weixin" placeholder="微信"  value="{$form.weixin}">
                </div>
                <!--<div class="form-group">-->
                    <!--<label>QQ</label>-->
                    <!--<input type="" class="form-control" name="qq" placeholder="QQ"  value="{$form.qq}">-->
                <!--</div>-->
                <div class="form-group">
                    <label>分类</label>
                    <select class="form-control" name="fenlei">
                        <option value="">全部</option>
                        {volist name='fenlei' id='data'}
                        <option value="{$data.id}" {eq name="form['fenlei']" value="$data.id"}selected="selected"{/eq} >{$data.name}</option>
                        {/volist}
                    </select>
                </div>
                <div class="form-group">
                    <label>渠道</label><!-- 网络部渠道来源  -->
                    <select class="form-control" name="qudao">
                        <option value="">全部</option>
                        {volist name='qudao' id='data'}
                        <option value="{$data.id}" {eq name="form['qudao']" value="$data.id"}selected="selected"{/eq} >{$data.name}</option>
                        {/volist}
                    </select>
                </div>
                <div class="form-group">
                    <label>区域</label>
                    <select class="form-control" name="area" id="area">
                        <option value="">全部</option>
                        {volist name='area' id='data'}
                        <option value="{$data.id}" {eq name="form['area']" value="$data.id"}selected="selected"{/eq} >{$data.name}</option>
                        {/volist}
                    </select>
                </div>
                <div class="form-group">
                    <label>收集医院</label>
                    <select class="form-control" name="yiyuan" id="yiyuan">
                        <option value="">全部</option>
                        {volist name='yiyuan' id='data'}
                            <option value="{$data.id}" {eq name="form['yiyuan']" value="$data.id"}selected="selected"{/eq} >{$data.name}</option>
                        {/volist}
                    </select>
                </div>
                <div class="form-group " >
                    <label>预产期</label>
                    <input type="text" class="form-control form-time" id="yctime" name="yctime" value="{$form.yctime}" >
                </div>
                {neq name='zhuanyuan' value='1'}
                <div class="form-group">
                    <label>建单客服</label>
                    <select class="form-control" name="jdry">
                        <option value="">全部</option>
                        {volist name='jdkf' id='data'}
                        <option value="{$data.id}" {eq name="form['jdry']" value="$data.id"}selected="selected"{/eq} >{$data.username}</option>
                        {/volist}
                    </select>
                </div>
                {/neq}
                <div class="form-group">
                    <label>建单时间</label>
                    <input type="text" class="form-control form-time" id="jdtime" name="jdtime" value="{$form.jdtime}" >
                </div>

                <div class="form-group">
                    <label>反馈人员</label>
                    <select class="form-control" name="fkry">
                        <option value="">全部</option>
                        {volist name='fkry' id='data'}
                        <option value="{$data.id}" {eq name="form['fkry']" value="$data.id"}selected="selected"{/eq} >{$data.username}</option>
                        {/volist}
                    </select>
                </div>

                <div class="form-group">
                    <label>邀约客服</label>
                    <select class="form-control" name="yykf">
                        <option value="">全部</option>
                        {volist name='yykf' id='data'}
                        <option value="{$data.id}" {eq name="form['yykf']" value="$data.id"}selected="selected"{/eq} >{$data.username}</option>
                        {/volist}
                    </select>
                </div>

                <div class="form-group">
                    <label>预约场馆</label>
                    <select class="form-control" name="yycg">
                        <option value="">全部</option>
                        {volist name='yycg' id='data'}
                        <option value="{$data.id}" {eq name="form['yycg']" value="$data.id"}selected="selected"{/eq} >{$data.title}</option>
                        {/volist}
                    </select>
                </div>
                <div class="form-group">
                    <label>业务状态</label>
                    <select class="form-control" name="ywstate">
                        <option value="">全部</option>
                        {volist name='ywstate' id='data'}
                        <option value="{$data.id}" {eq name="form['ywstate']" value="$data.id"}selected="selected"{/eq} >{$data.name}</option>
                        {/volist}
                    </select>
                </div>
                <!--<div class="form-group">-->
                    <!--<label>追踪日期</label>-->
                    <!--<input type="text" class="form-control form-time" id="zztime" name="zztime" value="{$form.zztime}" >-->
                <!--</div>-->
                <div class="form-group">
                    <label>预约拍摄时间</label>
                    <input type="text" class="form-control form-time " id="yypstime" name="yypstime" value="{$form.yypstime}" >
                </div>
                <div class="form-group">
                    <label>取消拍摄时间</label>
                    <input type="text" class="form-control form-time " id="qxpstime" name="qxpstime" value="{$form.qxpstime}" >
                </div>
                <div class="form-group">
                    <label>未到拍摄时间</label>
                    <input type="text" class="form-control form-time"  id="wdpstime" name="wdpstime" value="{$form.wdpstime}" >
                </div>
                <div class="form-group">
                    <label>反馈时间</label>
                    <input type="text" class="form-control form-time"  id="fktime" name="fktime" value="{$form.fktime}">
                </div>
                <!--<div class="form-group">
                    <label>金牌匹配</label>
                    <select class="form-control" name="jinpai">
                        <option>1</option>
                        <option>2</option>
                    </select>
                </div>-->
            </div>
            <div class="box_right">
                <button class="btn btn-color-g">开始</br>查询</button>
                <button class="btn btn-color-b" id="button">生成</br>报表</button>
                <a type="reset" href="{:url('olist',['reset'=>1])}" class="btn btn-success" id="resetbtn">重置</br>表单</a>
            </div>
        </div>
    </form>
</section>
<!-- 查询结束 -->
<!-- 列表开始 -->
<div class="row" style="padding:15px;">
    <div class="col-xs-12">
        <div class="box box-list">
            <div class="box-header" data-original-title="" style="height: 40px;">
                <a href="{:url('add')}" class="btn"><h2 style="margin-top: 0;"><i class="glyphicon glyphicon-plus"></i> 增加订单</h2></a>

                <!--<button type="button" class="btn" id="abtn" style="border:none;outline: none;box-shadow: none;">-->
                    <!--<h2 style="margin-top: 0"><i class="glyphicon glyphicon-tags"></i> 显示选项</h2>-->
                <!--</button>-->
            </div>

            <div class="box-body table-responsive no-padding" style="border-bottom: 1px solid #dfdfdf;overflow: hidden;">
                <table class="table table-striped table-bordered table-condensed">
                    <tr>
                        <th>ID</th>
                        <th>姓名</th>
                        <th>妈妈电话</th>
                        <th>家人电话</th>
                        <th>微信</th>
                        <!--<th>QQ</th>-->
                        <th>预产期</th>
                        <th>建单时间</th>
                        <th>分类</th>
                        <th>区域</th>
                        <!--<th>收集医院</th>-->
                        <th>渠道</th>
                        <th>业务状态</th>
                        <th>预约拍摄时间</th>
                        <th>邀约客服</th>
                        <th>追踪日期</th>
                        <th>预约场馆</th>
                        <th>渠道备注</th>
                        <th>邀约备注</th>
                        <th>拍摄备注</th>
                        <!--<th>活动门店</th>-->
                        <!--<th>会所专员</th>-->
                        <!--<th>会所状态</th>-->
                        <th>反馈人员</th>
                        <th>建单人员</th>
                        <th>最后操作</th>
                        <!--<th>金牌匹配</th>-->
                        <th>操作</th>
                    </tr>
                    {volist name='list' id="vo" }
                    <tr id="id{$vo.id}">
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.maphone}</td>
                        <td>{neq name='vo.otherphone' value='0'}{$vo.otherphone}{/neq}</td>
                        <td>{neq name='vo.weixin' value='0'}{$vo.weixin}{/neq}</td>
                        <!--<td>{$vo.qq}</td>-->
                        {eq name="vo.yctime" value="1970-01-01"}<td></td>{else/}<td>{$vo.yctime}</td>{/eq}
                        {eq name="vo.jdtime" value="1970-01-01 8:00"}<td></td>{else/}<td>{$vo.jdtime}</td>{/eq}
                        <td>{$vo.lbxx_text}</td><!-- 分类 -->
                        <td>{$vo.area_text}</td>
                        <!--<td>{$vo.yyxx_text}</td>--><!-- 医院信息 -->
                        <td>{$vo.qdxx_text}</td><!-- 渠道信息 -->
                        <!--<td><span class="color{$vo.ywstate}">{$vo.state_text}</span></td>&lt;!&ndash; 业务状态 &ndash;&gt;-->
                        <td><span style="background-color: {$vo.color_text};width: 80px;">{$vo.state_text}</span></td>
                        {eq name="vo.yypstime" value="1970-01-01 8:00"}<td></td>{else/}<td>{$vo.yypstime}</td>{/eq}
                        <td>{$vo.yykf_text}</td>
                        {eq name="vo.zztime" value="1970-01-01"}<td></td>{else/}<td>{$vo.zztime}</td>{/eq}
                        <td>{$vo.yycg_text}</td>
                        <td><span class="tanchu" data-toggle="tooltip" data-placement="right" title="{$vo.qdbz}">{neq name='vo.qdbz' value='0'}{$vo.qdbz|msubstr=0,4}{/neq}</span></td>
                        <td><span class="tanchu" data-toggle="tooltip" data-placement="right" title="{$vo.yybz}">{neq name='vo.yybz' value='0'}{$vo.yybz|msubstr=0,4}{/neq}</span></td>
                        <td><span class="tanchu"  data-toggle="tooltip" data-placement="right" title="{$vo.psbz}">{neq name='vo.psbz' value='0'}{$vo.psbz|msubstr=0,4}{/neq}</span></td>
                        <!--<td>{$vo.hsmd_text}</td>-->
                        <!--<td>{$vo.hszy_text}</td>&lt;!&ndash; 会所组员 &ndash;&gt;-->
                        <!--<td>{$vo.hszt_text}</td>&lt;!&ndash; 会所状态 &ndash;&gt;-->
                        <td><span class="label bg-red">{$vo.fkry_text}</span></td> <!-- 反馈人员 -->
                        <td>{$vo.jdry_text}</td> <!-- 建单人员 -->
                        {eq name="vo.cztime" value="1970-01-01"}<td></td>{else/}<td>{$vo.cztime}</td>{/eq}
                        <!--<td>{$vo.jinpai}</td>-->  <!-- 金牌 -->
                        <td>
                            <!-- 查看订单详细 -->
                            <a class="btn btn-nopadding" href="javascript:catorder('{:url('catorder',['id'=>$vo['id']])}');" alt="查看" title="查看"><i class="glyphicon glyphicon-zoom-in icon-white"></i></a>
                            <!-- 编辑订单 -->
                            <a class="btn btn-nopadding" href="javascript:editquanxian('{:url('getQuanxian',['id'=>$vo['id']])}');" alt="修改" title="修改"><i class="glyphicon glyphicon-edit icon-white"></i></a>
                            <!-- 删除订单 -->
                            <a class="btn btn-nopadding" href="javascript:del('{:url('del',['id'=>$vo['id']])}');" alt="删除" title="删除"><i class="glyphicon glyphicon-trash icon-white"></i></a>
                            <!-- 查看订单日志 -->
                            <a class="btn btn-nopadding" href="javascript:catlog('{:url('catlog',['orderid'=>$vo['id']])}');" alt="查看日志" title="查看日志"><i class="glyphicon glyphicon-list-alt icon-white"></i></a>
                            <!-- 微信推送 -->
                            <a class="btn btn-nopadding" href="javascript:pushweixin('{:url('pushweixin',['id'=>$vo['id']])}');" alt="微信推送" title="微信推送"><i class="fa fa-weixin"></i></a>
                        </td>
                    </tr>
                    {/volist}

                </table>
            </div>
            <div class="page">{$page}</div>
        </div>
    </div>
</div>
<!-- 列表结束 -->
</div>
{/block}


{block name="js"}
<script type="text/javascript" src="__JS__/moment.js"></script>
<script type="text/javascript" src="__JS__/daterangepicker.js"></script>
<script type="text/javascript" src="__JS__/date.js"></script>
<script type="text/javascript" src="__JS__/yewu.js"></script>

<script type="text/javascript">
    $(function () {
        var id = {$editid};
        if(id != 0){
            document.getElementById('id'+id).scrollIntoView();
            $("#id"+id).css('background','#ddd');
        }
    });
</script>

<script type="text/javascript">
    document.onselectstart = function(){
        event.returnValue = false;
    }

    $(function(){

        $('#showlayer').click(function(){
            $('.layer-box').show();
        });
        // $('#abtn').click(function(){
        // 	$('.layer-box').show();
        // });
        $('#closebtn').click(function(){
            $('.layer-box').hide();
        })
        var layertext=$('#layerbox').text();
        $('#abtn').on('click', function(){
            var layertext=$('#layerbox').html();
            layer.open({
                type: 1,
                title: false,
                area: ['1000px', '560px'],
                shadeClose: true, //点击遮罩关闭
                content: layertext
            });
        });
        var checkall=$('#all');
        var uncheck=$('#uncheck');
        var othercheck=$('#othercheck');
        var checkdiv=$('#check-div');
        checkall.click(function(){
            checkdiv.find("input[type='checkbox']").prop('checked',true);
        });
        uncheck.click(function(){
            checkdiv.find("input[type='checkbox']").prop('checked',false);
        });
        othercheck.click(function(){
            checkdiv.find("input[type='checkbox']").each(function(){
                $(this).prop("checked", !$(this).prop("checked"));
            });
        });

        var checkallbox=$('#box-all');
        var uncheckbox=$('#box-uncheck');
        var otherbox=$('#box-othercheck');
        var checkbox=$('#check-box');
        checkallbox.click(function(){
            checkbox.find("input[type='checkbox']").prop('checked',true);
        });
        uncheckbox.click(function(){
            checkbox.find("input[type='checkbox']").prop('checked',false);
        });
        otherbox.click(function(){
            checkbox.find("input[type='checkbox']").each(function(){
                $(this).prop("checked", !$(this).prop("checked"));
            });
        });
        //备注弹出
        $('.tanchu').hover(function (){
            $(this).tooltip('toggle');
        });
    });
    highlight_subnav("{:url('olist')}");

</script>
{/block}
